package larpplanner.database;

import java.util.List;

@DBTable("char_universe")
public class CharUniverse implements DBObject {

	public static final String UNIVERSE_COL = "universe_name";
	public static final String CHARID_COL   = "char_id";
	
	
	@DBCol(UNIVERSE_COL)
	protected String universe;

	@DBCol(CHARID_COL)
	protected Long charId;
	
	@DBListRelation(table="fic_character", join_col=CHARID_COL, val_col="char_name")
	protected List<String> charName;
	
		
	public CharUniverse() { }

	
	public String getUniverse() {
		return universe;
	}

	public void setUniverse(String universe) {
		this.universe = universe;
	}

	public Long getCharId() {
		return charId;
	}

	public void setCharId(Long charId) {
		this.charId = charId;
	}

	public String getCharName() {
		return charName.get(0);
	}

	public void setCharName(String charName) {
		this.charName.set(0,charName);
	}

	public String toString() {
		return universe + " " + charId + " " + charName;
	}
	
}
